import React, { Component } from "react";
import EditableTable from "./TaskForm";

export default class Task extends Component {
  state = {
    formData: [],
  };
  getData = async () => {
    const res = await this.http("Task");
    this.setState({
      formData: res.data.dtos,
    });
  };
  componentDidMount() {
    this.getData();
  }
  render() {
    return (
      <div>
        <EditableTable refresh={this.getData} formData={this.state.formData} />
      </div>
    );
  }
}
